var count = 1;
var container = document.getElementById('container');

function getUserAction() {
    container.innerHTML = count++;
};

function debounce(func, wait) {
    var timeout;
    var pre = 0
    var now = +new Date()
    return function () {
        if(now - pre > wait || !timeout){
        clearTimeout(timeout)
        timeout = setTimeout(function () {
            func.call(this)
        }, wait);
        pre = now
        }
    }
}

container.onmousemove = debounce(getUserAction, 100);
